package cn.edu.sdjzu.xg.eagle.entity;

import lombok.Getter;
import lombok.Setter;

public class User {
    private Long id;
    @Setter
    @Getter
    private String username;
    @Setter
    @Getter
    private String password;
    @Setter
    @Getter
    private Teacher teacher;
    public User(Long id,String username,String password,Teacher teacher){
        this(username,password,teacher);
        this.id = id;
    }
    public User(String username,String password,Teacher teacher){
        super();
        this.username = username;
        this.password = password;
        this.teacher = teacher;
    }
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }

    public String toString(){
        final String TAB = " ";
        String retValue = "";
        retValue = "User("
                + super.toString() + TAB
                +"id=" + this.id + TAB
                +"username=" + this.username+TAB
                +"password=" + this.password + TAB
                +"teacher_id=" + this.teacher.getId() + TAB
                +")";
        return retValue;
    }
}
